package com.itheima.dao;
/*
* 数组元素求和
* */
public class Arr4 {
    public static void main(String[] args) {
        int []arr={123,456,789,123};
        int num=0;
        for (int i = 0; i < arr.length; i++) {
            num+=arr[i];
        }
        System.out.println(num);
    }
}
